/*
 * @Author: White
 * @description: 封装请求
 * @LastEditTime: 2021-07-08 19:47:44
 */

import axios from 'axios'

// 单个商品详情查询
export function getDetails(id) {
    return axios( `api/item/detail?spuId=${id}`, {
        methods: 'GET'
    })
}

// 获取推荐商品列表
export function getShopList(id, page) {
    return axios( `api/item/spu-list?categoryTypeId=${id}&pageNum${page}`, {
        methods: 'GET'
    })
}

// 分类列表
export function getCategory() {
    return axios('api/item/platform-brand', {
        methods: 'GET'
    })
}
// 文章详情
export function getArticle(id) {
    return axios(`api/item/platform-article-detail?articleId=${id}`, {
        methods: 'GET'
    })
}
// 点赞
export function articleUp(data) {
    return axios('api/item/platform-article-up', {
        methods: 'GET',
        params:data
    })
}